<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>重点关注-关注收入</title>
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/custom.form.css">
    <link rel="stylesheet" href="/newmain/css/jquery.gritter.css"/>
</head>
<body>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header"></div>
                <div class="layui-card-body">
                    <div class="panel panel-default operation_case_dataScope" hidden>
                        <div class="panel-heading title"></div>
                        <div class="layui-card-body">
                            <form class="layui-form " action="" lay-filter="deptInfo"
                                  style="width: 700px;margin-top: 10px">
                                <label>
                                    <input name="roleId" hidden/>
                                </label>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">数据范围</label>
                                    <div class="layui-input-block">
                                        <label for="dataScope"></label><input id="dataScope" name="dataScope" hidden/>
                                        <label for="dataScopeS"></label><select id="dataScopeS" name="dataScopeS"
                                                                                lay-filter="select-datascope">
                                        <option value="">请选择</option>
                                        <option value="0">省局</option>
                                        <option value="1">市局</option>
                                        <option value="2">县区局</option>
                                    </select>
                                    </div>
                                </div>
                                <div id="choose-dept" hidden>
                                    <div class="layui-form-item" style="margin-left: 40px;">
                                        <div class="layui-tree">
                                            <div id="deptTree"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button type="submit" class="layui-btn" lay-submit=""
                                                lay-filter="submit_datascope">保存
                                        </button>
                                        <button class="layui-btn layui-btn-primary" id="btn_cancel">返回</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>

                    <div class="layui-tab layui-tab-brief">
                        <ul class="layui-tab-title">
                            <li class="layui-this">查补入库统计表</li>
                            <li>关注收入</li>
                        </ul>
                        <div class="layui-tab-content">

                            <!-- 查补入库 -->
                            <div class="layui-tab-item layui-show">
                                <div id="containerT1" class="layui-card">
                                    <div class="layui-card-body" style="padding: 0;">
                                        <table class="layui-table" lay-size="sm" style="margin: 0;">
                                            <thead>
                                            <tr>
                                                <th rowspan="2"
                                                    style="text-align: center; vertical-align: middle;"></th>
                                                <th colspan="6" style="text-align: center;">查补总额(单位：万元)</th>
                                                <th colspan="7" style="text-align: center;">入库总额(单位：万元)</th>
                                            </tr>
                                            <tr>
                                                <th style="text-align: center;">税款</th>
                                                <th style="text-align: center;">滞纳金</th>
                                                <th style="text-align: center;">没收违法所得</th>
                                                <th style="text-align: center;">罚款</th>
                                                <th style="text-align: center;">自查</th>
                                                <th style="text-align: center;">合计</th>
                                                <th style="text-align: center;">税款</th>
                                                <th style="text-align: center;">滞纳金</th>
                                                <th style="text-align: center;">没收违法所得</th>
                                                <th style="text-align: center;">罚款</th>
                                                <th style="text-align: center;">自查</th>
                                                <th style="text-align: center;">合计</th>
                                                <th style="text-align: center;">其中：地方级</th>
                                            </tr>
                                            </thead>
                                            <tbody id="containerT1_tbody">
                                            <!-- 数据行由 JS 动态插入 -->
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                <div id="containerT2" style="display: none;">
                                    <div class="layui-card">
                                        <div class="layui-card-body" style="padding: 0;">
                                            <table class="layui-table" lay-size="sm" style="margin: 0;">
                                                <thead>
                                                <tr>
                                                    <th rowspan="2"
                                                        style="text-align: center; vertical-align: middle;"></th>
                                                    <th colspan="6" style="text-align: center;">查补总额</th>
                                                    <th colspan="6" style="text-align: center;">入库总额</th>
                                                </tr>
                                                <tr>
                                                    <th style="text-align: center;">税款</th>
                                                    <th style="text-align: center;">滞纳金</th>
                                                    <th style="text-align: center;">没收违法所得</th>
                                                    <th style="text-align: center;">罚款</th>
                                                    <th style="text-align: center;">自查</th>
                                                    <th style="text-align: center;">合计</th>
                                                    <th style="text-align: center;">税款</th>
                                                    <th style="text-align: center;">滞纳金</th>
                                                    <th style="text-align: center;">没收违法所得</th>
                                                    <th style="text-align: center;">罚款</th>
                                                    <th style="text-align: center;">自查</th>
                                                    <th style="text-align: center;">合计</th>
                                                </tr>
                                                </thead>
                                                <tbody id="containerT2_tbody">
                                                <!-- 数据动态插入 -->
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>

                                    <div style="margin-top: 16px; text-align: center;">
                                        <button class="layui-btn layui-btn-primary" onclick="returnxiazuanQ()">返回
                                        </button>
                                    </div>
                                </div>
                            </div>

                            <!-- 关注收入 -->
                            <div class="layui-tab-item">
                                <form class="layui-form" style="margin: 10px 0 0 20px">
                                    <div class="layui-row">
                                        <div class="layui-input-inline" style="width: 260px !important;">
                                            <label for="nsrsbh"></label>
                                            <input type="text" id="nsrsbh"
                                                   class="layui-input"
                                                   autocomplete="off"
                                                   placeholder="请输入纳税人识别号">
                                        </div>
                                        <div class="layui-input-inline" style="width: 260px !important;">
                                            <label for="nsrmc"></label>
                                            <input type="text" id="nsrmc"
                                                   class="layui-input"
                                                   autocomplete="off"
                                                   placeholder="请输入企业名称">
                                        </div>
                                        <div class="layui-input-inline" style="width: 260px !important;">
                                            <label for="rkrqTime"></label>
                                            <input type="text" readonly class="layui-input" id="rkrqTime"
                                                   placeholder="请选择入库日期">
                                        </div>
                                        <div class="layui-input-inline" style="width: 260px !important;">
                                            <label for="rkxhTime"></label>
                                            <input type="text" readonly class="layui-input" id="rkxhTime"
                                                   placeholder="请选择入库销号日期">
                                        </div>
                                        <div class="layui-input-inline" style="width: 260px !important;">
                                            <label for="caseType"></label>
                                            <select id="caseType">
                                                <option value="0">请选择案件类型</option>
                                                <option value="0">全部</option>
                                                <option value="1">稽查</option>
                                                <option value="2">自查</option>
                                            </select>
                                        </div>
                                        <!-- 所属区 -->
                                        <div class="layui-input-inline" style="width: 260px !important;">
                                            <label for="area"></label>
                                            <select id="area"></select>
                                        </div>
                                    </div>
                                    <div class="layui-row" style="margin-top: 5px">
                                        <!-- 检查各局 -->
                                        <div class="layui-input-inline" style="width: 260px !important;">
                                            <label for="checkQs"></label>
                                            <select id="checkQs" lay-filter="checkQs"></select>
                                        </div>
                                        <!-- 检查科室 -->
                                        <div class="layui-input-inline" style="width: 260px !important;">
                                            <label for="checkKeShi"></label>
                                            <select id="checkKeShi" lay-filter="checkKeShi">
                                                <option value="">请选择检查科室</option>
                                            </select>
                                        </div>
                                        <!-- 检查人 -->
                                        <div class="layui-input-inline" style="width: 250px !important;">
                                            <div id="zcrSelect" style="width: 248px"></div>
                                        </div>

                                        <div class="layui-input-inline" style="margin-left: 10px">
                                            <button class="layui-btn" onclick="search()" type="button">
                                                查询
                                            </button>
                                        </div>
                                    </div>

                                </form>
                                <div style="margin-top: 10px">
                                    <table class="layui-hide" id="income_table" lay-filter="income_table"></table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="exportAllData">导出全部数据</button>
    </div>
</script>
<script src="/js/main/jquery.js"></script>
<script src="/layui/layui.all.js"></script>
<script src="/js/core.util.js"></script>
<script src="/layui-ext/selectM/selectM.js"></script>
<script>
    //获取token
    const token = CoreUtil.getData("access_token");
    //地址栏转义token中的#号
    const tokenQuery = token.replace("#", "%23");
    let tableIns1;
    var table = layui.table;
    var form = layui.form;
    var layer = layui.layer;
    var $ = jQuery = layui.jquery;
    var laydate = layui.laydate;
    var xmSelect = layui.xmSelect;
    var tree = layui.tree;
    var startTime = null;
    var endTime = null;
    let zcrSelect;
    layui.config({
        base: '/'
    }).extend({
        eleTree: 'layui-ext/eleTree/eleTree',
        xmSelect: 'layui/xm-select' // 这里添加 xmSelect
    }).use(['table', 'laypage', 'layer', 'laydate', 'tree', 'eleTree', 'xmSelect'], function () {
        //表格
        tableIns1 = table.render({
            elem: '#income_table'
            , contentType: 'application/json'
            , headers: {"authorization": token}
            , where: {loadOrNOT: 0}
            , url: '/attention/attentionInfome/incomelist' //数据接口
            , title: "关注收入"
            , page: true
            , limits: [10]
            , method: 'POST', totalRow: true
            , parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
                return {
                    "code": res.code, //解析接口状态
                    "msg": res.msg, //解析提示文本
                    "count": CoreUtil.isEmpty(res.data) ? 0 : res.data.total, //解析数据长度
                    "data": CoreUtil.isEmpty(res.data) ? null : res.data.records //解析数据列表;
                }
            }
            , cols: [
                [
                    // {type: 'checkbox', fixed: 'left'},
                    {
                        field: 'ajbh',
                        title: '案件编号',
                        width: 200,
                        align: 'center',
                        totalRowText: "汇总",
                        templet: function (d) {
                            return d.ajbh + "\t";
                        }
                    },
                    {
                        field: 'nsrsbh',
                        title: '纳税人识别号',
                        width: 200,
                        align: 'center',
                        sort: true,
                        templet: function (d) {
                            return d.nsrsbh + "\t";
                        }
                    },
                    {field: 'nsrmc', title: '纳税人名称', width: 260, align: 'center', sort: true},
                    {field: 'jcks', title: '检查科室', width: 280, align: 'center', sort: true},
                    {field: 'jcr', title: '检查人', width: 300, align: 'center', sort: true},
                    {field: 'area', title: '所属区', width: 200, align: 'center', sort: true},
                    {field: 'zsxm', title: '征收项目', width: 120, align: 'center', sort: true},
                    {field: 'zspm', title: '征收品目', width: 120, align: 'center', sort: true},
                    {field: 'sksx', title: '税款属性', width: 160, align: 'center', sort: true},
                    {
                        field: 'rksj',
                        title: '入库时间',
                        width: 120,
                        align: "center",
                        sort: true,
                        templet: function (d) {
                            if (!d.rksj) {
                                return '';
                            }
                            return layui.util.toDateString(d.rksj, 'yyyy-MM-dd');
                        }
                    },
                    {
                        field: 'rkje',
                        title: '入库金额',
                        width: 150,
                        align: 'center',
                        totalRow: true, sort: true,
                        templet: function (d) {
                            return setNumber2(d.rkje);
                        }
                    },
                    {
                        field: 'rksj',
                        title: '入库销号时间',
                        width: 120,
                        align: 'center',
                        sort: true,
                        templet: function (d) {
                            return d.rksj.split(' ')[0]; // 仅保留日期部分
                        }
                    },
                    {
                        field: 'zyj', title: '中央级', width: 120, align: 'center', sort: true, templet: function (d) {
                            return setNumber2(d.zyj);
                        }
                    },
                    {
                        field: 'ssj', title: '省级', width: 120, align: 'center', sort: true, templet: function (d) {
                            return setNumber2(d.ssj);
                        }
                    },
                    {
                        field: 'dsj', title: '地市级', width: 120, align: 'center', sort: true, templet: function (d) {
                            return setNumber2(d.dsj);

                        }
                    },
                    {
                        field: 'qxj', title: '县区级', width: 120, align: 'center', sort: true, templet: function (d) {
                            return setNumber2(d.qxj);
                        }
                    },
                    {
                        field: 'xzj', title: '乡镇级', width: 120, align: 'center', sort: true, templet: function (d) {
                            return setNumber2(d.xzj);
                        }
                    },
                ]
            ]
            , toolbar: '#toolbar'
        });
        //导出
        table.on('toolbar(income_table)', function () {
            // 获取已渲染的 xmSelect 实例（假设 zcrSelect 是全局变量）
            const selectedValues = zcrSelect.getValue('value'); // 取选中的值，返回数组
            layer.confirm('确定导出所有数据?', {icon: 3, title: '提示'}, function (index) {
                var mapArr = {
                    nsrsbh: $("#nsrsbh").val(),
                    nsrmc: $("#nsrmc").val(),
                    startTime: startTime,
                    endTime: endTime,
                    caseType: $("#caseType").val(),
                    jjSwjgdm: $("#checkQs").val(),
                    checkKeShi: $("#checkKeShi").val(),
                    area: $("#area").val(),
                    jcryList: selectedValues,
                    loadOrNOT: "1"
                };
                CoreUtil.sendPost("/attention/attentionInfome/incomelistForExport", mapArr, function (res) {
                    if (res.code === 0) {
                        var data = res.data;
                        if (!CoreUtil.isEmpty(data)) {
                            //全部导出
                            table.exportFile(tableIns1.config.id, data, 'xlsx', "关注收入");
                            //导出时阻止页面刷新
                            $(".layui-form").submit(function (e) {
                                e.preventDefault();
                            })
                        } else {
                            layer.alert('未查询到需要导出的数据！', {icon: 2});
                        }
                    }
                });
                layer.close(index);
            });
        });
        //入库日期
        laydate.render({
            elem: '#rkrqTime'
            , type: 'date'
            , range: '~'
            , done: function (value) {
                if (value !== null && value !== undefined && value !== "") {
                    startTime = value.split("~")[0];
                    endTime = value.split("~")[1];
                } else {
                    startTime = null;
                    endTime = null;
                }

            }
        });
        //入库销号日期
        laydate.render({
            //入库销号时间
            elem: '#rkxhTime'
            , type: 'date'
            , value: null
            , done: function (value) {
                if (value !== null && value !== undefined && value !== "") {
                    endTime = value;
                } else {
                    endTime = null;
                }
            }
        });
        // 页面初始渲染，先渲染一个空的 xmSelect
        zcrSelect = xmSelect.render({
            el: '#zcrSelect',
            filterable: true,
            theme: {color: '#009688'},
            tips: '请选择检查人员',
            data: []
        });
        //初始化检查全局查询条件
        CoreUtil.sendPost("/attention/gy/getcurrentswjgqj", null, function (res) {
            let datas = res.data;
            let options = "<option value = ''>请选择局级单位</option>" +
                "<option value = 'ALL'>全市</option>";
            for (let i = 0; i < datas.length; i++) {
                options += '<option value="' + datas[i].swjgDm + '">' + datas[i].swjgjc + '</option>';
            }
            $('#checkQs').append(options);
            // 更新select渲染
            form.render('select');
        });
        // 监听局级单位选择变化，联动加载科室
        form.on('select(checkQs)', function (data) {
            let selectedSwjgdm = data.value;

            if (!selectedSwjgdm) {
                $('#checkKeShi').html('<option value="">请先选择检查科室</option>');
                form.render('select');
                return;
            }

            // 发请求获取该局的下属科室
            CoreUtil.sendPost("/attention/gy/getcurrentswjgks", {swjgdm: selectedSwjgdm}, function (res) {
                let keshiList = res.data;
                let ksOptions = '<option value="">请选择检查科室</option>';
                for (let i = 0; i < keshiList.length; i++) {
                    ksOptions += '<option value="' + keshiList[i].swjgDm + '">' + keshiList[i].swjgjc + '</option>';
                }
                $('#checkKeShi').html(ksOptions);
                form.render('select');
            });
        });
        // ✅ 监听科室选择变化
        form.on('select(checkKeShi)', function () {
            const swjgdm = $('#checkQs').val(); // 获取局级单位选择值
            if (!swjgdm) {
                layer.msg('请先选择局级单位！');
                $('#checkKeShi').val(""); // 清空科室选择
                form.render('select');
                return; // ⛔ 阻止继续执行
            }

            // ✅ 获取协查人列表
            CoreUtil.sendPost("/attention/gy/getcurrentswjgry", {swjgdm: swjgdm}, function (res) {
                if (res.code === 0) {
                    let value = res.data || [];
                    let dataList = value.map(item => ({
                        name: item.swryxm,
                        value: item.swryxm
                    }));

                    if (zcrSelect) {
                        zcrSelect.update({data: dataList});
                    } else {
                        zcrSelect = xmSelect.render({
                            el: '#zcrSelect',
                            filterable: true,
                            theme: {
                                color: '#009688',
                            },
                            tips: '请选择检查人员',  // 这里改成主查人
                            name: 'zcrList',      // 这里改成你想要的提交字段名
                            data: dataList
                        });
                    }
                } else {
                    layer.msg(res.msg);
                }
            });

        });
        //初始化区域
        CoreUtil.sendPost("/attention/gy/getallarea", null, function (res) {
            let datas = res.data;
            let options = "<option value = ''>请选择所属区</option><option value = ''>全局</option>";
            for (let i = 0; i < datas.length; i++) {
                options += '<option value="' + datas[i].swjgDm + '">' + datas[i].swjgmc + '</option>';
            }
            $('#area').append(options);
            // 更新select渲染
            form.render('select');
        });
        //查补入库
        $("#containerT1_tbody").empty(); // 清空原有数据
        CoreUtil.sendPost("/statistics/chabuandruku", {"swjgDm": ""}, function (res) {
            let tableDatas = res.data.tableDatas;
            let tableHjDatas = res.data.tableHjDatas;//合计行
            let dataScope = res.data.dataScope;
            $.each(tableDatas, function (index, item) {
                let swjgmcTD = "";
                if ("all" === dataScope) {
                    swjgmcTD = "<td style='text-align: center'>" +
                        '<a href="javascript:void(0);" style="color:darkorchid" onclick=' +
                        '"xiazuanQ(' + item.swjgdm + ')">' +
                        item.swjgmc + "</a></td>";
                } else if ("jcj" === dataScope) {
                    swjgmcTD = "<td style='text-align: center'>" + item.swjgmc + "</td>";
                }
                let rowHtml = "<tr>" +
                    swjgmcTD +
                    "<td style='text-align: center;color:black'>" + item.cbskje + "</td>" + "<td style='text-align: center;color:black'>" + item.cbznjje + "</td>" +
                    "<td style='text-align: center;color:black'>" + item.cbmswfsdje + "</td><td style='text-align: center;color:black'>" + item.cbfkje + "</td>" +
                    "<td style='text-align: center;color:black'>" + item.cbzcje + "</td><td style='text-align: center;color:black'>" + item.cbhj + "</td>" +
                    "<td style='text-align: center;color:black'>" + item.rkskje + "</td><td style='text-align: center;color:black'>" + item.rkznjje + "</td>" +
                    "<td style='text-align: center;color:black'>" + item.rkmswfsdje + "</td><td style='text-align: center;color:black'>" + item.rkfkje + "</td>" +
                    "<td style='text-align: center;color:black'>" + item.rkzcje + "</td>" + "<td style='text-align: center;color:black'>" + item.rkhj + "</td>" +
                    "<td style='text-align: center;color:black'>" + item.rkqzdfj + "</td>" +
                    "</tr>";
                $("#containerT1_tbody").append(rowHtml);
            });
            //合计行
            let hjData = tableHjDatas[0];
            const hjrowhtml = "<tr>"
                + "<td style='text-align: center'>合计</td>"
                + "<td style='text-align: center;color:black'>" + hjData.cbskjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.cbznjjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.cbmswfsdjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.cbfkjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.cbzcjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.cbhjtotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.rkskjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.rkznjjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.rkmswfsdjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.rkfkjezstotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.rkzcjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.rkhjtotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.rkqzdfjtotal + "</td>"
                + "</tr>";
            $("#containerT1_tbody").append(hjrowhtml);
        });

    });

    //执行查询
    function search() {

        // 获取已渲染的 xmSelect 实例（假设 zcrSelect 是全局变量）
        const selectedValues = zcrSelect.getValue('value'); // 取选中的值，返回数组

        console.log(selectedValues);


        //这里以搜索为例
        tableIns1.reload({
            where: { //设定异步数据接口的额外参数，任意设
                nsrsbh: $("#nsrsbh").val(),
                nsrmc: $("#nsrmc").val(),
                startTime: startTime,
                endTime: endTime,
                caseType: $("#caseType").val(),
                jjSwjgdm: $("#checkQs").val(),
                checkKeShi: $("#checkKeShi").val(),
                area: $("#area").val(),
                jcryList: selectedValues,
                loadOrNOT: "1"
            }
            , page: {
                curr: 1 //重新从第 1 页开始
            }
        });
    }

    //设置数值保留小数点后两位
    function setNumber2(value) {
        value = parseFloat(value);  // 将值转换为浮动数字
        if (!isNaN(value)) {
            return value.toFixed(2);  // 如果是有效数字，保留两位小数
        }
        return value;
    }

    // 明细表下钻
    function xiazuanQ(swjgDm) {
        $("#containerT2_tbody").empty(); // 清空原有数据
        CoreUtil.sendPost("/statistics/chabuandruku", {"swjgDm": swjgDm}, function (res) {
            let tableDatas = res.data.tableDatas;
            let tableHjDatas = res.data.tableHjDatas;//合计行
            let dataScope = res.data.dataScope;
            $.each(tableDatas, function (index, item) {
                let swjgmcTD = "";
                swjgmcTD = "<td style='text-align: center'>" + item.swjgmc + "</td>";
                let rowHtml = "<tr>" +
                    swjgmcTD +
                    "<td style='text-align: center;color:black'>" + item.cbskje + "</td>" + "<td style='text-align: center;color:black'>" + item.cbznjje + "</td>" +
                    "<td style='text-align: center;color:black'>" + item.cbmswfsdje + "</td><td style='text-align: center;color:black'>" + item.cbfkje + "</td>" +
                    "<td style='text-align: center;color:black'>" + item.cbzcje + "</td><td style='text-align: center;color:black'>" + item.cbhj + "</td>" +
                    "<td style='text-align: center;color:black'>" + item.rkskje + "</td><td style='text-align: center;color:black'>" + item.rkznjje + "</td>" +
                    "<td style='text-align: center;color:black'>" + item.rkmswfsdje + "</td><td style='text-align: center;color:black'>" + item.rkfkje + "</td>" +
                    "<td style='text-align: center;color:black'>" + item.rkzcje + "</td>" + "<td style='text-align: center;color:black'>" + item.rkhj + "</td>" +
                    "</tr>";
                $("#containerT2_tbody").append(rowHtml);
            });
            //合计行
            let hjData = tableHjDatas[0];
            const hjrowhtml = "<tr>"
                + "<td style='text-align: center'>合计</td>"
                + "<td style='text-align: center;color:black'>" + hjData.cbskjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.cbznjjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.cbmswfsdjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.cbfkjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.cbzcjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.cbhjtotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.rkskjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.rkznjjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.rkmswfsdjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.rkfkjezstotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.rkzcjetotal + "</td>"
                + "<td style='text-align: center;color:black'>" + hjData.rkhjtotal + "</td>"
                + "</tr>";
            $("#containerT2_tbody").append(hjrowhtml);
            let div1 = document.getElementById("containerT1");
            let div2 = document.getElementById("containerT2");
            div1.style.display = "none";
            div2.style.display = "block";
        });
    }

    function returnxiazuanQ() {
        let div1 = document.getElementById("containerT1");
        let div2 = document.getElementById("containerT2");
        div1.style.display = "block";
        div2.style.display = "none";
    }
</script>
</body>
</html>